home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Advanced L282641092001.psc / Lotto / frmCheck.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-10-10  |  15.8 KB  |  415 lines

  1. VERSION 5.00
  2. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
  3. Object = "{5DC35748-D70A-417E-93B7-A488F085B02F}#89.0#0"; "SMARTNETBUTTON.OCX"
  4. Begin VB.Form frmCheck 
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   " "
  7.    ClientHeight    =   5220
  8.    ClientLeft      =   45
  9.    ClientTop       =   330
  10.    ClientWidth     =   6240
  11.    ControlBox      =   0   'False
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   5220
  16.    ScaleWidth      =   6240
  17.    ShowInTaskbar   =   0   'False
  18.    StartUpPosition =   3  'Windows Default
  19.    Begin VB.CheckBox chkSub2 
  20.       Height          =   195
  21.       Left            =   5880
  22.       TabIndex        =   14
  23.       Top             =   240
  24.       Value           =   1  'Checked
  25.       Width           =   255
  26.    End
  27.    Begin VB.CheckBox chkSub1 
  28.       Height          =   195
  29.       Left            =   5040
  30.       TabIndex        =   13
  31.       Top             =   240
  32.       Value           =   1  'Checked
  33.       Width           =   255
  34.    End
  35.    Begin SmartNetButtonProject.SmartNetButton cmdCheck 
  36.       Height          =   375
  37.       Left            =   45
  38.       TabIndex        =   11
  39.       TabStop         =   0   'False
  40.       Top             =   600
  41.       Width           =   2955
  42.       _ExtentX        =   5212
  43.       _ExtentY        =   661
  44.       Caption         =   "Check Your Numbers"
  45.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  46.          Name            =   "MS Sans Serif"
  47.          Size            =   8.25
  48.          Charset         =   0
  49.          Weight          =   400
  50.          Underline       =   0   'False
  51.          Italic          =   0   'False
  52.          Strikethrough   =   0   'False
  53.       EndProperty
  54.       CaptionOffsetTop=   1
  55.       CaptionBackColor=   -2147483624
  56.       CaptionAreaPercent=   100
  57.       ShowCaption     =   -1  'True
  58.    End
  59.    Begin RichTextLib.RichTextBox txtWinAnswer 
  60.       Height          =   4095
  61.       Left            =   45
  62.       TabIndex        =   9
  63.       Top             =   1080
  64.       Width           =   6135
  65.       _ExtentX        =   10821
  66.       _ExtentY        =   7223
  67.       _Version        =   393217
  68.       Enabled         =   -1  'True
  69.       ScrollBars      =   2
  70.       DisableNoScroll =   -1  'True
  71.       TextRTF         =   $"frmCheck.frx":0000
  72.    End
  73.    Begin VB.TextBox txtNo 
  74.       Alignment       =   2  'Center
  75.       BeginProperty Font 
  76.          Name            =   "Arial"
  77.          Size            =   12
  78.          Charset         =   0
  79.          Weight          =   400
  80.          Underline       =   0   'False
  81.          Italic          =   0   'False
  82.          Strikethrough   =   0   'False
  83.       EndProperty
  84.       Height          =   390
  85.       Index           =   7
  86.       Left            =   5300
  87.       MaxLength       =   3
  88.       TabIndex        =   8
  89.       Top             =   120
  90.       Width           =   495
  91.    End
  92.    Begin VB.TextBox txtNo 
  93.       Alignment       =   2  'Center
  94.       BeginProperty Font 
  95.          Name            =   "Arial"
  96.          Size            =   12
  97.          Charset         =   0
  98.          Weight          =   400
  99.          Underline       =   0   'False
  100.          Italic          =   0   'False
  101.          Strikethrough   =   0   'False
  102.       EndProperty
  103.       Height          =   390
  104.       Index           =   6
  105.       Left            =   4440
  106.       MaxLength       =   3
  107.       TabIndex        =   7
  108.       Top             =   120
  109.       Width           =   495
  110.    End
  111.    Begin VB.Frame fraNos 
  112.       BorderStyle     =   0  'None
  113.       Caption         =   "Frame1"
  114.       Height          =   375
  115.       Left            =   50
  116.       TabIndex        =   0
  117.       Top             =   120
  118.       Width           =   3495
  119.       Begin VB.TextBox txtNo 
  120.          Alignment       =   2  'Center
  121.          BeginProperty Font 
  122.             Name            =   "Arial"
  123.             Size            =   12
  124.             Charset         =   0
  125.             Weight          =   400
  126.             Underline       =   0   'False
  127.             Italic          =   0   'False
  128.             Strikethrough   =   0   'False
  129.          EndProperty
  130.          Height          =   390
  131.          Index           =   5
  132.          Left            =   3000
  133.          MaxLength       =   3
  134.          TabIndex        =   6
  135.          Top             =   0
  136.          Width           =   495
  137.       End
  138.       Begin VB.TextBox txtNo 
  139.          Alignment       =   2  'Center
  140.          BeginProperty Font 
  141.             Name            =   "Arial"
  142.             Size            =   12
  143.             Charset         =   0
  144.             Weight          =   400
  145.             Underline       =   0   'False
  146.             Italic          =   0   'False
  147.             Strikethrough   =   0   'False
  148.          EndProperty
  149.          Height          =   375
  150.          Index           =   4
  151.          Left            =   2400
  152.          MaxLength       =   3
  153.          TabIndex        =   5
  154.          Top             =   0
  155.          Width           =   495
  156.       End
  157.       Begin VB.TextBox txtNo 
  158.          Alignment       =   2  'Center
  159.          BeginProperty Font 
  160.             Name            =   "Arial"
  161.             Size            =   12
  162.             Charset         =   0
  163.             Weight          =   400
  164.             Underline       =   0   'False
  165.             Italic          =   0   'False
  166.             Strikethrough   =   0   'False
  167.          EndProperty
  168.          Height          =   375
  169.          Index           =   3
  170.          Left            =   1800
  171.          MaxLength       =   3
  172.          TabIndex        =   4
  173.          Top             =   0
  174.          Width           =   495
  175.       End
  176.       Begin VB.TextBox txtNo 
  177.          Alignment       =   2  'Center
  178.          BeginProperty Font 
  179.             Name            =   "Arial"
  180.             Size            =   12
  181.             Charset         =   0
  182.             Weight          =   400
  183.             Underline       =   0   'False
  184.             Italic          =   0   'False
  185.             Strikethrough   =   0   'False
  186.          EndProperty
  187.          Height          =   375
  188.          Index           =   2
  189.          Left            =   1200
  190.          MaxLength       =   3
  191.          TabIndex        =   3
  192.          Top             =   0
  193.          Width           =   495
  194.       End
  195.       Begin VB.TextBox txtNo 
  196.          Alignment       =   2  'Center
  197.          BeginProperty Font 
  198.             Name            =   "Arial"
  199.             Size            =   12
  200.             Charset         =   0
  201.             Weight          =   400
  202.             Underline       =   0   'False
  203.             Italic          =   0   'False
  204.             Strikethrough   =   0   'False
  205.          EndProperty
  206.          Height          =   375
  207.          Index           =   1
  208.          Left            =   600
  209.          MaxLength       =   3
  210.          TabIndex        =   2
  211.          Top             =   0
  212.          Width           =   495
  213.       End
  214.       Begin VB.TextBox txtNo 
  215.          Alignment       =   2  'Center
  216.          BeginProperty Font 
  217.             Name            =   "Arial"
  218.             Size            =   12
  219.             Charset         =   0
  220.             Weight          =   400
  221.             Underline       =   0   'False
  222.             Italic          =   0   'False
  223.             Strikethrough   =   0   'False
  224.          EndProperty
  225.          Height          =   375
  226.          Index           =   0
  227.          Left            =   0
  228.          MaxLength       =   3
  229.          TabIndex        =   1
  230.          Top             =   0
  231.          Width           =   495
  232.       End
  233.    End
  234.    Begin SmartNetButtonProject.SmartNetButton cmdCancel 
  235.       Height          =   375
  236.       Left            =   3195
  237.       TabIndex        =   12
  238.       TabStop         =   0   'False
  239.       Top             =   600
  240.       Width           =   2955
  241.       _ExtentX        =   5212
  242.       _ExtentY        =   661
  243.       Caption         =   "Cancel"
  244.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  245.          Name            =   "MS Sans Serif"
  246.          Size            =   8.25
  247.          Charset         =   0
  248.          Weight          =   400
  249.          Underline       =   0   'False
  250.          Italic          =   0   'False
  251.          Strikethrough   =   0   'False
  252.       EndProperty
  253.       CaptionOffsetTop=   1
  254.       CaptionBackColor=   -2147483624
  255.       CaptionAreaPercent=   100
  256.       ShowCaption     =   -1  'True
  257.    End
  258.    Begin VB.Label Label1 
  259.       BackStyle       =   0  'Transparent
  260.       Caption         =   "Subs:"
  261.       BeginProperty Font 
  262.          Name            =   "Arial"
  263.          Size            =   14.25
  264.          Charset         =   0
  265.          Weight          =   700
  266.          Underline       =   0   'False
  267.          Italic          =   0   'False
  268.          Strikethrough   =   0   'False
  269.       EndProperty
  270.       Height          =   375
  271.       Left            =   3600
  272.       TabIndex        =   10
  273.       Top             =   120
  274.       Width           =   855
  275.    End
  276. Attribute VB_Name = "frmCheck"
  277. Attribute VB_GlobalNameSpace = False
  278. Attribute VB_Creatable = False
  279. Attribute VB_PredeclaredId = True
  280. Attribute VB_Exposed = False
  281. Private Sub cmdCancel_Click()
  282. Dim A As Integer
  283. 'hides showing form and enabled main one
  284.     frmCheck.Hide
  285.     frmMain.Enabled = True
  286.     frmMain.Show
  287. 'clears all text boxes
  288.     For A = 0 To 7
  289.         txtNo(A).Text = ""
  290.     Next
  291.     txtWinAnswer.Text = ""
  292. End Sub
  293. Private Sub cmdCheck_Click()
  294. Dim A As Integer, B As Integer, C As Integer, D As Integer, E As Integer, F As Integer
  295. Dim templine As String, NextNo As Boolean, CharLen As Integer
  296. Dim Char As String, Char2 As String, Char3 As String, TempSub As String
  297. Dim NoCorrect(1 To 1000000) As WinNonLineNo
  298. Dim tempNo As Integer, TempText As String, Winner As String
  299. 'First checks if numbers inputed is correct
  300. For E = 0 To (ViewingNo - 1)
  301.     If IsNumeric(txtNo(E).Text) = False Or Val(txtNo(E).Text) < 0 Then
  302.     'tells user if wrong input
  303.         MsgBox "Sorry, one of the numbers you have entered in is incorrect", vbOKOnly, "Error"
  304.     'exits sub
  305.         Exit Sub
  306.     End If
  307.     For F = 0 To (ViewingNo - 1)
  308.         If txtNo(E).Text = txtNo(F).Text Then
  309.             If E <> F Then
  310.             'tells user if wrong input
  311.                 MsgBox "Sorry, one or more of the numbers you have entered in is the same", vbOKOnly, "Error"
  312.             'exits sub
  313.                 Exit Sub
  314.             End If
  315.         End If
  316.     Next
  317. tempNo = 0
  318. NextNo = False
  319. 'opens the file that numbers saved in
  320. Open frmMain.cdlOpen.FileName For Input As 1
  321.         'loops until end of file
  322.         Do Until EOF(1)
  323.         'places line that currently reading in templine
  324.         Line Input #1, templine
  325.         'variable for use later to work out the line no.
  326.             tempNo = tempNo + 1
  327.         'as the first line is text the below If makes sure below code only
  328.         'starts if the second line is being read
  329.             If tempNo > 1 Then
  330.                 'puts down to line no.
  331.                     NoCorrect(tempNo - 1).LineNo = Val(tempNo - 1)
  332.                 'loops for the amount of characters in each line
  333.                 For B = 1 To Len(templine)
  334.                     'places the current character into char variable
  335.                     Char = Mid(templine, B, 1)
  336.                     'if a char variable was a space the loop before
  337.                     If NextNo = True Then
  338.                         NextNo = False
  339.                         'loop below finds out if number is 1,2 or 3 characters (e.g 0 - 999)
  340.                         Do Until D = 3
  341.                             D = D + 1
  342.                             'places the next 3 characters  after the character found in the char variable one by one after each loop
  343.                             Char2 = Mid(templine, (B + D), 1)
  344.                             'if char2 is a space, using the do loop it finds if the number is 1,2 or 3 digits
  345.                             If Char2 = " " Then
  346.                                 'if 1 digit
  347.                                 If D = 1 Then
  348.                                     CharLen = 1
  349.                                     Exit Do
  350.                                 'if 2 digit
  351.                                 ElseIf D = 2 Then
  352.                                     CharLen = 2
  353.                                     Exit Do
  354.                                 'if 3 digit
  355.                                 Else
  356.                                     CharLen = 3
  357.                                     Exit Do
  358.                                 End If
  359.                             End If
  360.                         Loop
  361.                         'resets d for next time
  362.                         D = 0
  363.                         'char3 is the actual final number
  364.                         Char3 = Mid(templine, (B), CharLen)
  365.                               'if 3 digit
  366.  pHl5I= ""
  367. End Sub
  368. Private Sub cmdCheck_Click()
  369. Dim A As Integer, B As Integer, C As Integer, D As Integer, E As Integer, F As Integer
  370. Dim templine As String, NextNo As Boolean, CharLen As Integer
  371. Dim Char As String, Char2 As String, Char3 As String, TempSub oo - 1)
  372.             .har2 As S
  373.  r As6       L StringvI      L Stl=         I t_ext
  374. tempNo = 0
  375. NextNo = False
  376. tempNo = 0
  377.    x   Loop
  378.          ext84Yo0       4s Boolean, CharLen As sI ii                  Char3 = As S
  379.  r As6sIigit
  380.  e  0
  381.          MaxLn        W               CharL(temto   A   'i=meC                Char3 = AttsS
  382.  r As6sIigit
  383.  e  0
  384.          MaxLn        W            '   temin the char variable one by one after each loop
  385.                             Char2 = Mid(templine, (B + D), 1)
  386.                             'if char2 is a space, using the do loop it finds if the number is 1,2 or 3 digits
  387.                             If Chare3    ne,44444444y0Integer, C As Integer,  digu8n   '   temi2Integer,  digu8n   '   temi2w#r2 AFd,4444444f D ir,  d
  388.    '   temi2Only, "FD     3    Xe no.
  389.      rrrr        -------2.y, "FD     3oo    rabInd  temi2w#r2 AFd,4444444f D ir,  d
  390.    '   temi2Only, "FD     3    Xe no.
  391.      rrrr        -------2.y, "FD     3oo    rabInd  temi2w#r2 AFd,4444444f D ir,  d
  392.    '   temi2Only, "FD     3    Xe no.
  393.      rrrr        -------2.y, "FD     3oo    rabInd  temi2w#r2 EFd,4444444f D ir,  d
  394.    '   teE   CharLAe tbEharLen AE'mi2w#r2 EFd, no.
  395.      rrrr        -------2.y, "FD     3oo    rabInd  temi2w#r2 EFd,4444444f D ir,  d
  396.    '   teE   CharLAe tbEharLen AE'mi2w#r2 EFd, no.
  397.      rrrr        -------2.y, "FD     3oo    rabInd  temi2w#r2 EFd,4444444f D ir,  d
  398.    '   teE   CharLAe tbEharLen A    X "Fs
  399.      yo9D--2.y, "FD     3     Bt2EharLenCDeeeeeeeeeeeeeod LOr       ----2Cf Xe                                                cgErc7111111111111110 Xe tbEharLen A    X "Fs
  400.     UFD  )d AB 15gcwcne that curres Stes Stes Stesisw=P   -   UFDb----sx, no.
  401. d AB 15   '   temi2w#r2 A   temi2Ondo8rrrr     tbEharLen A 5E rr        -------2.y, "FD     3oo    rabInd  temi2w#r2 EFd,4444444f D ir,  d
  402.    '   teE   CharLAe tbEharLen AE'mi2w#r2 EFd, no.
  403.      rrrr        -------2.y, "FD     3oo    rabInd} 3333ttemi2Ondo8rrrr  Next
  404. tempNo = 0
  405. >D-2.y, "FDeatte15   '   temi2w#r2 A   temi2Ondo8rrrr     tbEharLen A 5E rrm8r  + D), 1)
  406.             do8rrrr  Next
  407. tempNo = 0
  408. >f"uu,"Fs
  409.   ""p       -------2.y, "FD     3oo    rabInd} 333NTTTTTTTTTTTT'e6kS8 thecrn A 5E ""pnC     =   0  'abInd} 3      5   2o8rrrr  eeN     Else
  410.                                      doel   H.10 XRles         Wi3e Nol0n    sc2.y, "FDeatte15   '   temi2w#r2 A          doel   H.10 XRles         Wi3e Nol0n    sc2.y, "FDeatte15   '   temi2w#r2 A          doel   H.10 XRles         Wi3e Nol0n    sc2.y, "FDeatte15   '   temi2w#r2 A          doel   H.10 XRles         Wi3e Nol0n    sc2.y, "FDeatte15   '   temi2w#r2 A    Ldd    A          doel   H.10 XRles      v, no.
  411.     n AE'mi2w#r2 EhF
  412.  ppe crB2 EhF
  413.  ppe cr   sc2.y, "FDeatte15   '   temi2w#r2 A          doelM1)
  414.   d""p       -------2
  415.